WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::ProcessorLoopClosure Class Referenceabstract

General loop closure processor. More...

#include <core/processor/processor_loop_closure.h>

Inheritance diagram for wolf::ProcessorLoopClosure:
[legend]

Public Member Functions

 ProcessorLoopClosure (const std::string &_type, const TypeComposite &_state_types, const YAML::Node &_params)
 
 ~ProcessorLoopClosure () override=default
 
void configure (SensorBasePtr _sensor) override
 
int getMaxLoops () const
 
void setMaxLoops (int _max_loops)
 
- Public Member Functions inherited from wolf::ProcessorBase
void startCaptureProfiling ()
 
void stopCaptureProfiling ()
 
void startKFProfiling ()
 
void stopKFProfiling ()
 
virtual void printProfiling (std::ostream &stream=std::cout) const
 
 ProcessorBase (const std::string &_type, const TypeComposite &_state_types, const YAML::Node &_params)
 constructor More...
 
 ~ProcessorBase () override
 
virtual void configure (SensorBasePtr _sensor)=0
 
virtual void remove ()
 
bool hasChildren () const override
 
const TypeComposite & getStateTypes () const
 
StateKeys getStateKeys () const
 
unsigned int id () const
 
void keyFrameCallback (FrameBasePtr _keyframe)
 notify a new keyframe made by another processor More...
 
void captureCallback (CaptureBasePtr _capture)
 notify a new capture More...
 
SensorBaseConstPtr getSensor () const
 
SensorBasePtr getSensor ()
 
YAML::Node getParams () const
 
bool isMotionProvider () const
 
bool applyLossFunction () const
 
bool isVotingActive () const
 
double getTimeTolerance () const
 
void setApplyLossFunction (bool _apply_loss_function)
 
void setVotingActive (bool _voting_active)
 
void setTimeTolerance (double _time_tolerance)
 
void setDebugVerboseLevel (const std::string &_debug_verbose_level)
 
std::string getDebugVerboseLevel () const
 
bool checkTimeTolerance (const TimeStamp &_ts1, const TimeStamp &_ts2) const
 
bool checkTimeTolerance (const CaptureBasePtr _cap, const TimeStamp &_ts) const
 
bool checkTimeTolerance (const FrameBasePtr _frm, const TimeStamp &_ts) const
 
bool checkTimeTolerance (const FrameBasePtr _frm, const CaptureBasePtr _cap) const
 
virtual void link (SensorBasePtr) final
 
virtual void printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const
 
void print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const
 
virtual CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
bool check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
- Public Member Functions inherited from wolf::NodeBase
 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 
virtual ~NodeBase ()=default
 
unsigned int nodeId () const
 
std::string getCategory () const
 
std::string getType () const
 
std::string getName () const
 
bool isRemoving () const
 
virtual bool hasChildren () const =0
 
void setType (const std::string &_type)
 
void setName (const std::string &_name)
 
ProblemConstPtr getProblem () const
 
ProblemPtr getProblem ()
 

Protected Member Functions

virtual void process (CaptureBasePtr)
 Process a capture (linked to a frame) If voteFindLoopClosures() returns true, findLoopClosures() is called. emplaceFactors() is called for pairs of current capture and each capture returned by findLoopClosures() More...
 
virtual bool voteFindLoopClosures (CaptureBasePtr cap)=0
 Returns if findLoopClosures() has to be called for the given capture. More...
 
virtual void emplaceFeatures (CaptureBasePtr cap)=0
 detects and emplaces all features of the given capture More...
 
virtual std::map< double, MatchLoopClosurePtr > findLoopClosures (CaptureBasePtr _capture)=0
 Find captures that correspond to loop closures with the given capture. More...
 
virtual bool validateLoopClosure (MatchLoopClosurePtr)=0
 validates a loop closure More...
 
virtual void emplaceFactors (MatchLoopClosurePtr)=0
 emplaces the factor(s) corresponding to a Loop Closure between two captures More...
 
void processCapture (CaptureBasePtr) override
 process an incoming capture More...
 
void processKeyFrame (FrameBasePtr _frm) override
 process an incoming key-frame More...
 
bool triggerInCapture (CaptureBasePtr _cap) const override
 trigger in capture More...
 
bool triggerInKeyFrame (FrameBasePtr _frm) const override
 trigger in key-frame More...
 
bool storeKeyFrame (FrameBasePtr _frm) override
 store key frame More...
 
bool storeCapture (CaptureBasePtr _cap) override
 store capture More...
 
bool voteForKeyFrame () const override
 Vote for KeyFrame generation. More...
 
- Protected Member Functions inherited from wolf::ProcessorBase
virtual void processCapture (CaptureBasePtr)=0
 process an incoming capture More...
 
virtual void processKeyFrame (FrameBasePtr _keyframe_ptr)=0
 process an incoming key-frame More...
 
virtual bool triggerInCapture (CaptureBasePtr) const =0
 trigger in capture More...
 
virtual bool triggerInKeyFrame (FrameBasePtr) const =0
 trigger in key-frame More...
 
virtual bool storeKeyFrame (FrameBasePtr)=0
 store key frame More...
 
virtual bool storeCapture (CaptureBasePtr)=0
 store capture More...
 
virtual bool voteForKeyFrame () const =0
 Vote for KeyFrame generation. More...
 
virtual bool permittedKeyFrame () const final
 
void setProblem (ProblemPtr) override
 
void addTypes (const TypeComposite &)
 add state types More...
 
virtual void setProblem (ProblemPtr _prob_ptr)
 

Additional Inherited Members

- Protected Attributes inherited from wolf::ProcessorBase
unsigned int processor_id_
 
YAML::Node params_
 
BufferFrame buffer_frame_
 
BufferCapture buffer_capture_
 
std::string debug_verbose_level_
 
- Protected Attributes inherited from wolf::NodeBase
ProblemWPtr problem_ptr_
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Text label identifying the type or subcategory of node ("Pin Hole", "Point 2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Detailed Description

General loop closure processor.

This is an abstract class.

Constructor & Destructor Documentation

◆ ProcessorLoopClosure()

wolf::ProcessorLoopClosure::ProcessorLoopClosure ( const std::string &  _type,
const TypeComposite &  _state_types,
const YAML::Node &  _params 
)

◆ ~ProcessorLoopClosure()

wolf::ProcessorLoopClosure::~ProcessorLoopClosure ( )
overridedefault

Member Function Documentation

◆ configure()

void wolf::ProcessorLoopClosure::configure ( SensorBasePtr  _sensor)
inlineoverridevirtual

Implements wolf::ProcessorBase.

◆ emplaceFactors()

virtual void wolf::ProcessorLoopClosure::emplaceFactors ( MatchLoopClosurePtr  )
protectedpure virtual

emplaces the factor(s) corresponding to a Loop Closure between two captures

◆ emplaceFeatures()

virtual void wolf::ProcessorLoopClosure::emplaceFeatures ( CaptureBasePtr  cap)
protectedpure virtual

detects and emplaces all features of the given capture

◆ findLoopClosures()

virtual std::map< double, MatchLoopClosurePtr > wolf::ProcessorLoopClosure::findLoopClosures ( CaptureBasePtr  _capture)
protectedpure virtual

Find captures that correspond to loop closures with the given capture.

◆ getMaxLoops()

int wolf::ProcessorLoopClosure::getMaxLoops ( ) const
inline

◆ process()

void wolf::ProcessorLoopClosure::process ( CaptureBasePtr  _capture)
protectedvirtual

Process a capture (linked to a frame) If voteFindLoopClosures() returns true, findLoopClosures() is called. emplaceFactors() is called for pairs of current capture and each capture returned by findLoopClosures()

◆ processCapture()

void wolf::ProcessorLoopClosure::processCapture ( CaptureBasePtr  )
overrideprotectedvirtual

process an incoming capture

Each derived processor should implement this function. It will be called if:

Implements wolf::ProcessorBase.

◆ processKeyFrame()

void wolf::ProcessorLoopClosure::processKeyFrame ( FrameBasePtr  _keyframe_ptr)
overrideprotectedvirtual

process an incoming key-frame

Each derived processor should implement this function. It will be called if:

  • A new KF arrived and triggerInKF() returned true.

Implements wolf::ProcessorBase.

◆ setMaxLoops()

void wolf::ProcessorLoopClosure::setMaxLoops ( int  _max_loops)
inline

◆ storeCapture()

bool wolf::ProcessorLoopClosure::storeCapture ( CaptureBasePtr  )
inlineoverrideprotectedvirtual

store capture

Returns true if the capture should be stored

Implements wolf::ProcessorBase.

◆ storeKeyFrame()

bool wolf::ProcessorLoopClosure::storeKeyFrame ( FrameBasePtr  )
inlineoverrideprotectedvirtual

store key frame

Returns true if the key frame should be stored

Implements wolf::ProcessorBase.

◆ triggerInCapture()

bool wolf::ProcessorLoopClosure::triggerInCapture ( CaptureBasePtr  ) const
inlineoverrideprotectedvirtual

trigger in capture

Returns true if processCapture() should be called after the provided capture arrived.

Implements wolf::ProcessorBase.

◆ triggerInKeyFrame()

bool wolf::ProcessorLoopClosure::triggerInKeyFrame ( FrameBasePtr  ) const
inlineoverrideprotectedvirtual

trigger in key-frame

Returns true if processKeyFrame() should be called after the provided KF arrived.

Implements wolf::ProcessorBase.

◆ validateLoopClosure()

virtual bool wolf::ProcessorLoopClosure::validateLoopClosure ( MatchLoopClosurePtr  )
protectedpure virtual

validates a loop closure

◆ voteFindLoopClosures()

virtual bool wolf::ProcessorLoopClosure::voteFindLoopClosures ( CaptureBasePtr  cap)
protectedpure virtual

Returns if findLoopClosures() has to be called for the given capture.

◆ voteForKeyFrame()

bool wolf::ProcessorLoopClosure::voteForKeyFrame ( ) const
inlineoverrideprotectedvirtual

Vote for KeyFrame generation.

If a KeyFrame criterion is validated, this function returns true, meaning that it wants to create a KeyFrame at the last Capture.

WARNING! This function only votes! It does not create KeyFrames!

Implements wolf::ProcessorBase.


The documentation for this class was generated from the following files: